﻿using System.Collections.Generic;
using System.Linq;
using Sportsbook.Domain.Models.Leagues;
using Sportsbook.Domain.Repositories;
using Sportsbook.InMemoryPersistence.Models.Leagues;

namespace Sportsbook.InMemoryPersistence.Repositories
{
    public class LeaguesRepository : ILeaguesRepository
    {
        private IEnumerable<League> GetList() 
        {
           return new List<League>
            {
                new League
                {
                    Id = "la-liga",
                    Name = "La Liga"
                },
                new League
                {
                    Id = "champions-league",
                    Name = "Champions League"
                }
            };
        }

        public List<ILeague> Get(string sportId, string filterType)
        {
            return GetList().Cast<ILeague>().ToList();
        }
    }
}